<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../vue-v2.0.3.js"></script>
    <script>
        Vue.filter("toDou",function(input,a,b){
            alert(input +","+a+","+b);
//            return input<10?"0"+input:input;
        });
       window.onload=function(){
            new Vue({
                el:"#box",
                data:{
                    msg:12
                }
            })
        }
    </script>
</head>
<body>
<div id="box">
    {{msg | toDou "12" "15"}}
</div>
</body>
</html>